package com.ruizhong.PIW.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruizhong.PIW.dao.TColumnMapper;
import com.ruizhong.PIW.entity.TColumn;
import com.ruizhong.PIW.service.ColumnService;
import com.ruizhong.PIW.utils.Result;
import com.ruizhong.PIW.utils.ResultCode;
import org.springframework.stereotype.Service;

@Service
public class ColumnServiceImpl extends ServiceImpl<TColumnMapper, TColumn> implements ColumnService {
    @Override
    public Result addColumn(TColumn tColumn) {
        boolean save = save(tColumn);
        if (!save){
            throw new RuntimeException("添加失败");
        }
        return new Result(ResultCode.success,"添加成功",null);
    }
}
